import React, {CSSProperties, ReactNode} from 'react'
import {NavBar} from "antd-mobile";

interface IProps {
    icon?: ReactNode;
    content: string;
    rightContent?: any
}

const MyNavBar = (props: IProps) => {
    const navStyle: CSSProperties = {
        position: 'fixed',
        top: 0,
        left: 0,
        right: 0,
        zIndex: 100
    }
    return (
        <div  style={navStyle}>
            <NavBar
                mode="dark"
                icon={props.icon}
                rightContent={props.rightContent}
            >{props.content}</NavBar>
        </div>
    )
}
export default MyNavBar